<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>新增渐变</title>
  <style>
    .box {
      width: 300px;
      height: 200px;
      border: 1px solid black;
      float: left;
      margin-left: 50px;
      font-size: 20px;
    }
    .box1 {
      /* linear-gradient 线性渐变 */
      /* background-image: linear-gradient(red, yellow, green); */
      /* radial-gradient 径向渐变 */
      background-image: radial-gradient(red, yellow, green);
      /* repeating-linear-gradient repeating-radical-gradient 重复渐变：在没有发生渐变的区域，重新开始渐变 */
    }
    .box2 {
      /* background-image: linear-gradient(to right top, red, yellow, green); */
      background-image: radial-gradient(at right top, red, yellow, green);
    }
    .box3 {
      /* 顺时针旋转 20 度 */
      /* background-image: linear-gradient(20deg, red, yellow, green); */
      background-image: radial-gradient(circle, red, yellow, green);
    }
    .box4 {
      /* background-image: linear-gradient(red 50px, yellow 100px, green 150px); */
      background-image: radial-gradient(200px 200px, red, yellow, green);
    }
  </style>
</head>
<body>
  <div class="box box1">1</div>
  <div class="box box2">2</div>
  <div class="box box3">3</div>
  <div class="box box4">4</div>
  <div class="box box5">5</div>
</body>
</html>